import Vue from "vue";
import VueRouter from "vue-router";
import Login from "@/views/Login";
import Register from "@/views/Register";
import Home from "@/views/Home";
import AppEdit from "@/views/AppEdit";
import UHome from "@/views/UHome";
import ShowApp from "@/views/ShowApp";

Vue.use(VueRouter);

const routes = [
  {
    path: "/login",
    name: "Login",
    component: Login
  },
  {
    path: "/register",
    name: "Register",
    component: Register
  },
  {
    path: "/home",
    name: "Home",
    component: Home
  },
  {
    path: "/app",
    name: "AppEdit",
    component: AppEdit
  },
  {
    path: "/",
    name: "UHome",
    component: UHome
  },
  {
    path: "/showApp",
    name: "ShowApp",
    component: ShowApp
  }
];

const router = new VueRouter({
  mode: "history",
  base: process.env.BASE_URL,
  routes
});

export default router;
